package com.subject.shuati.domain.covert;

import com.subject.shuati.domain.entity.SubjectInfoBo;
import com.subject.shuati.domain.entity.SubjectOptionBo;
import com.subject.shuati.infra.basic.entity.SubjectInfo;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 实体类与Bo之间的转换
 */
@Mapper
public interface SubjectInfoConverter {

    SubjectInfoConverter INSTANCE = Mappers.getMapper(SubjectInfoConverter.class);

    /**
     * BO转实体类
     * @param subjectInfoBo
     * @return
     */
    SubjectInfo BoConverterToInfo(SubjectInfoBo subjectInfoBo);

    /**
     * BO转实体类
     * @param subjectOptionBo
     * @return
     */
    SubjectInfoBo OptionConverterToBo(SubjectOptionBo subjectOptionBo,SubjectInfo subjectInfo);
    /**
     * BO集合转实体类集合
     * @param subjectInfoList
     * @return
     */
    List<SubjectInfoBo> BoConverterToInfoList(List<SubjectInfo> subjectInfoList);
}
